// ====================================================================================
// Copyright(C) 2018 FI Ltd. All rights reserved.
//
// SYSTEM NAME      : FI.Net Application Framework
// COMPONENT ID     : FI.Helpers.Data.Configuration.CommandData
// COMPONENT DESC   : Configuration settings for stored procedure
//
// CREATED DATE/BY : 18 Aug 2018 / Tian Mi
//
// REVISION HISTORY:   DATE/BY      SR#/CS/PM#/OTHERS     DESCRIPTION OF CHANGE
// ===================================================================================

using System.ComponentModel;
using System.Configuration;
using FI.Core.Configuration;

namespace FI.Helpers.Data.Configuration
{
    /// <summary>    
    /// Configuration settings for default stored procedure format.
    /// </summary>  
    public class CommandData : NamedConfigurationElement
    {
        private const string FormatProperty = "format"; 

        /// <summary>
        /// The default stored procedure format for delete command.
        /// </summary>
        public const string Delete = "Delete";

        /// <summary>
        /// The default stored procedure format for insert command.
        /// </summary>
        public const string Insert = "Insert";

        /// <summary>
        /// The default stored procedure format for select command.
        /// </summary>
        public const string Select = "Select";

        /// <summary>
        /// The default stored procedure format for update command.
        /// </summary>
        public const string Update = "Update";

        /// <summary>
        /// Gets the f default stored procedure.
        /// </summary>
        /// <value>The format.</value>
        [ConfigurationProperty(FormatProperty, IsRequired = true)]
        public string Format
        {
            get { return (string)base[FormatProperty]; }
            set { base[FormatProperty] = value; }
        }
    }
}